﻿namespace KingerRobot.MexicoSailunMDC.SpiService;
internal interface IProdMaterial
{

    List<POProdMaterial> GetMaterialByCodes(List<string> materialCodes);
    /// <summary>
    /// 创建物料
    /// </summary>
    /// <param name="materialCode">物料编号</param>
    /// <param name="materialName">物料名称</param>
    /// <returns></returns>
    POProdMaterial CreateMaterial(string materialCode, string materialName);

    /// <summary>
    /// 创建物料(按照赛轮mes新方法)
    /// </summary>
    /// <param name="tireInfo"></param>
    /// <returns></returns>
    POProdMaterial AddProdMaterial(TireInfo tireInfo);
    /// <summary>
    /// 获取物料入库序号
    /// </summary>
    /// <param name="materialId"></param>
    /// <returns></returns>
    POWcsMaterialRatio GetMaterialRatioByMaterialId(long materialId);
    /// <summary>
    /// 查找物料
    /// </summary>
    /// <param name="materialCode">物料编号</param>
    /// <returns></returns>
    POProdMaterial GetMaterialByCode(string materialCode);
    /// <summary>
    /// Spec 获取物料信息
    /// </summary>
    /// <param name="spec"></param>
    /// <returns></returns>
    POProdMaterial GetMaterialBySpec(string spec);

    /// <summary>
    /// Spec 获取物料信息
    /// </summary>
    /// <param name="spec"></param>
    /// <returns></returns>
    List<MaterialCodeBean> GetMaterialCodeAndId();

    /// <summary>
    /// 通过spec集合获取物料信息
    /// </summary>
    /// <param name="specs"></param>
    /// <returns></returns>
    List<POProdMaterial> GetMaterialBySpecs(List<string> specs);
    /// <summary>
    /// 获取所有物料
    /// </summary>
    /// <returns></returns>
    List<POProdMaterial> GetMaterials();
    /// <summary>
    /// 查找物料
    /// </summary>
    /// <param name="materialId">物料Id</param>
    /// <returns></returns>
    POProdMaterial GetMaterialById(long materialId);
    /// <summary>
    /// 通过 SKUID 获取物料信息
    /// </summary>
    /// <param name="skuId"></param>
    /// <returns></returns>
    POProdMaterial GetMaterialBySkuId(long skuId);
    /// <summary>
    /// 通过MesId查找物料
    /// </summary>
    /// <param name="mesId"></param>
    /// <returns></returns>
    POProdMaterial GetMaterialByMesId(string mesId);
    /// <summary>
    /// 同步生产数据
    /// </summary>
    /// <param name="materialInfo"></param>
    /// <returns></returns>
    int RefreshMaterial(MaterialMDCInfo materialInfo);
    /// <summary>
    /// 修改物料信息
    /// </summary>
    /// <param name="material"></param>
    /// <returns></returns>
    int UpdateMaterialScanNumById(POProdMaterial material);
    /// <summary>
    /// 修改胎高
    /// </summary>
    /// <param name="materialCode"></param>
    /// <param name="height"></param>
    /// <returns></returns>

    int UpdateMaterialHeightByCode(string materialCode, string height);

    List<StockMaterialCodeNumBean> GetStockMaterialCodeAndNum();
}
public class MaterialCodeBean
{
    public long? MaterialId { get; set; }
    public string MaterialCode { get; set; }
}